<%--
  Created by IntelliJ IDEA.
  User: tanbing
  Date: 2020-10-26 0026
  Time: 上午 10:50
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="../include/header.jsp"></jsp:include>
    <link rel="stylesheet" href="../../plugins/daterangepicker/daterangepicker.css">

    <!-- Google Font: Source Sans Pro -->
    <%--<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">--%>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- Navbar -->
    <jsp:include page="../include/nav.jsp"/>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <jsp:include page="../include/aside.jsp"/>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>添加游客</h1>
                    </div>

                </div>
            </div><!-- /.container-fluid -->
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12">
                        <!-- general form elements -->
                        <div class="card card-primary">
                            <div class="card-header">
                                <h3 class="card-title">产品信息</h3>
                            </div>
                            <!-- /.card-header -->
                            <!-- form start -->
                            <form role="form" action="/tourist/edit" method="post" accept-charset="UTF-8">
                                <div class="card-body">
                                    <input name="id" value="${tourist.id}" type="hidden"/>
                                    <div class="form-group">
                                        <label >游客姓名</label>
                                        <input value="${tourist.touristName}" name="touristName" type="text" class="form-control"  placeholder="游客姓名">
                                    </div>

                                    <div class="form-group col-md-6 float-left">
                                        <label >性别</label>
                                        <select name="touristSex" class="form-control select2" style="width: 100%;">
                                            <c:if test="${tourist.touristSex.equals('男')}">
                                                <option  value="男" selected="selected">男</option>
                                                <option  value="女" >女</option>
                                            </c:if>
                                            <c:if test="${tourist.touristSex.equals('女')}">
                                                <option  value="女" selected="selected">女</option>
                                                <option  value="男" >男</option>
                                            </c:if>

                                        </select>
                                    </div>
                                    <div class="form-group col-md-6 float-left">
                                        <label >身份证</label>
                                        <input value="${tourist.touristIdcard}" name="touristIdcard" type="text" class="form-control"  placeholder="身份证">
                                    </div>
                                    <div class="form-group col-md-6 float-left">
                                        <label >电话</label>
                                        <input value="${tourist.touristPhone}" name="touristPhone" type="text" class="form-control"  placeholder="电话">
                                    </div>
                                    <div class="form-group">
                                        <label>生日</label>
                                        <div class="input-group date" id="reservationdate" data-target-input="nearest">
                                            <input value='<fmt:formatDate value="${tourist.touristBrithday}"
                                                            pattern="yyyy-MM-dd"/>' name="touristBrithday" type="text" class="form-control datetimepicker-input" data-target="#reservationdate"/>
                                            <div class="input-group-append" data-target="#reservationdate" data-toggle="datetimepicker">
                                                <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                            </div>
                                        </div>
                                    </div>

                                </div>


                                <div class="card-footer">
                                    <button type="submit" class="btn btn-primary">Submit</button>
                                </div>
                            </form>
                        </div>

                    </div>

                </div>
                <!-- /.row -->
            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <jsp:include page="../include/footer.jsp"/>

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Select2 -->
<script src="../../plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="../../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="../../plugins/moment/moment.min.js"></script>
<script src="../../plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>
<!-- date-range-picker -->
<script src="../../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Bootstrap Switch -->
<script src="../../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<!-- AdminLTE App -->
<script src="../../js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../js/demo.js"></script>

<script type="text/javascript">
    $(document).ready(function () {
        bsCustomFileInput.init();
    });

    $('#reservationdate').datetimepicker({
        format: 'YYYY-MM-DD'
    });
</script>
</body>
</html>
